<?php 
ini_set('display_errors', true);  
error_reporting(E_ALL&~E_NOTICE); 
date_default_timezone_set('Asia/Shanghai');
$lifeTime = 7*24*3600; 
session_set_cookie_params($lifeTime); 
session_start(); 
?>